Make sure png comes first, otherwise dnd may use bmp by default, loosing
authorMatthias Clasen <mclasen@redhat.com>
Wed, 25 May 2005 14:02:21 +0000 (14:02 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Wed, 25 May 2005 14:02:21 +0000 (14:02 +0000)
2005-05-25  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtkselection.c (gtk_target_list_add_image_targets):
Make sure png comes first, otherwise dnd may use bmp by
default, loosing transparency.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-8
gtk/gtkselection.c

index 3b16a5bbbe770d0acd0684c1226377a178949169..4ebb9bcba620877d1f97c65db3c42dea1ab77d4b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-05-25  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkselection.c (gtk_target_list_add_image_targets): 
+       Make sure png comes first, otherwise dnd may use bmp by
+       default, loosing transparency.
+
 2005-05-25  Michael Natterer  <mitch@imendio.com>
 
        * gtk/gtktextview.c (blink_cb): block the text_layout's "changed"
index 3b16a5bbbe770d0acd0684c1226377a178949169..4ebb9bcba620877d1f97c65db3c42dea1ab77d4b 100644 (file)
@@ -1,3 +1,9 @@
+2005-05-25  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkselection.c (gtk_target_list_add_image_targets): 
+       Make sure png comes first, otherwise dnd may use bmp by
+       default, loosing transparency.
+
 2005-05-25  Michael Natterer  <mitch@imendio.com>
 
        * gtk/gtktextview.c (blink_cb): block the text_layout's "changed"
index 3b16a5bbbe770d0acd0684c1226377a178949169..4ebb9bcba620877d1f97c65db3c42dea1ab77d4b 100644 (file)
@@ -1,3 +1,9 @@
+2005-05-25  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkselection.c (gtk_target_list_add_image_targets): 
+       Make sure png comes first, otherwise dnd may use bmp by
+       default, loosing transparency.
+
 2005-05-25  Michael Natterer  <mitch@imendio.com>
 
        * gtk/gtktextview.c (blink_cb): block the text_layout's "changed"
index 0318e75c2928fbaa0c3f24a7b07f9f9ac349172e..1c04c3f2414daa0bde92c6d64273212698c6e32e 100644 (file)
@@ -362,6 +362,21 @@ gtk_target_list_add_image_targets (GtkTargetList *list,
 
   formats = gdk_pixbuf_get_formats ();
 
+  /* Make sure png comes first */
+  for (f = formats; f; f = f->next)
+    {
+      GdkPixbufFormat *fmt = f->data;
+      
+      if (strcmp (gdk_pixbuf_format_get_name (fmt), "png") == 0)
+       {
+         formats = g_slist_delete_link (formats, f);
+         formats = g_slist_prepend (formats, fmt);
+
+         break;
+       }
+
+    }  
+
   for (f = formats; f; f = f->next)
     {
       GdkPixbufFormat *fmt = f->data;